The IEEE 1588 standard is known as "Precision Clock Synchronization Protocol for Networked Measurement and Control Systems" or "PTP" for short. PTP defines a procedure allowing many spatially distributed real-time clocks to be synchronized through a "package-compatible" network (normally Ethernet). The technology behind the IEEE 1588 standard was originally developed by Agilent and was used for distributed measuring and control tasks. The challenge was to synchronize networked measuring devices with each other in terms of time so that they are able to record measured values and provide them with a precise system time stamp. Based on this time stamp, the measured values can then be correlated with each other.
Synchronization principle of IEEE 1588
In Ethernet systems, unpredictable collisions due to the CSMA/CD procedure may lead to time packages being delayed or disappearing completely. For this reason, IEEE 1588 defines a special "clock synchronization" procedure.
First, one node (IEEE 1588 master clock) transmits a "Sync" telegram, which contains the estimated transmission time. The exact transmission time is captured by a clock and transmitted in a second "Follow Up" message. Based on the first and second telegram and by means of its own clock, the receiver can now calculate the time difference between its clock and the master clock. To achieve the best possible results, the IEEE 1588 time stamps should be generated in hardware or as close as possible to the hardware.
The telegram propagation time is determined cyclically in a second transmission process between the slave and the master ("delay" telegrams). The slave can then correct its clock and adapt it to the current bus propagation time.
Configuration of a IEEE 1588 Network
A IEEE 1588 network configures and segments itself automatically. For this, each node uses the "best master clock" algorithm (BMC) in order to determine the best clock in the segment. Every PTP clock stores its features within a specified dataset. These features are transmitted to other nodes within its "Sync" telegrams. Based on this, other nodes are able to synchronize their datasets with the features of the actual master and can adjust their clocks accordingly. Due to the cyclic running of the BMC, nodes can also be connected or removed during propagation time (hot plugging).
No distinction is made in the IEEE 1588 protocol between a software clock and a hardware clock. However, to be able to work with synchronism in the nanosecond range, hardware support is required. Generally, the synchronization errors – caused by software jitter – cannot be eliminated. With a pure software solution (e.g. Windows systems), the error may actually be in the micro- or milli-second range.